package org.mozhu.mboot.core.security;

import lombok.Builder;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Set;

@Data
@Builder
public class IdentifiedUserDetails implements UserDetails {
    private Long userId;
    private String username;
    private String password;
    private Set<GrantedAuthority> authorities;
    @Builder.Default
    private boolean accountNonExpired = true;
    @Builder.Default
    private boolean accountNonLocked = true;
    @Builder.Default
    private boolean credentialsNonExpired = true;
    private boolean enabled;
}
